#include "list.h"
#include "vector.h"

namespace czb 
{
	void func1()
	{
		list<int> lt;
		lt.push_back(1);
		lt.push_back(2);
		lt.push_back(3);
		lt.push_back(4);
		lt.push_back(5);
		for (auto e : lt)
		{
			cout << e << " ";
		}
		cout << endl;
		list<int>::reverse_iterator rbegin = lt.rbegin();
		while (rbegin != lt.rend())
		{
			cout << *rbegin<<" ";
			++rbegin;
		}
		cout << endl;

		const list<int> lt1(lt);
		for (auto e : lt1)
		{
			cout << e << " ";
		}
		cout << endl;
	}

	void func2()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(12);
		v.push_back(13);
		v.push_back(14);
		v.push_back(15);

		for (auto e : v)
		{
			cout << e << " ";
		}
		cout << endl;

		vector<int>::reverse_iterator rbegin = v.rbegin();
		while (rbegin != v.rend())
		{
			cout << *rbegin << " ";
			++rbegin;
		}
		cout << endl;
	}
}

int main()
{
	czb::func2();
}